var header=document.querySelector('#header')
window.addEventListener("scroll", function () {
  var sc=document.documentElement.scrollTop;
  if(sc>500){
    header.style.backgroundColor='rgba(238, 169, 89, 0.9)';
  }else {
    header.style.backgroundColor='rgba(255,255,255,.1)';
  }
 })